$webwork.htmlEncode($page.space.name) : 2 Request Response
This page last changed on Sep 27, 2006 by cholmes.
PreambleThe Request-Response system is the subsystem of GeoServer which deals with communication with the outside world. Before jumping in lets define some terminology in which we can use to define what the subsystem does. A Service is a component running inside of GeoServer which performs tasks on behalf of a client. Examples include Web Map Service (WMS), and Web Feature Service (WFS). A service expsoses a set of Operations to the outside world. An operation is a specific task that the service can perform on behalf of a client. Examples include GetCapabilities,GetFeature, etc... A Request is the process of calling an operation of a service. A Response is the result of the request. The responsibilities of the Request-Response system include:
The following diagram depicts the workflow: DesignThe following class diagram is a more formal description of the Request-Response system which indicates the major players and the relationships between them.
Abstract ServiceFirst off, this interface is poorly named. At the code level, an AbstractService really maps to an operation of a service. So this interface would better be named AbstractOperation. Keeping the distincation in mind and looking at a service implementation such as WFS we find an implementation of AbstractService for each operation defined. This is depicted in the following class diagram. Each "service" is responsible for the following:
RequestThis interface is the representation of the operation being performed. It is mostly just a data object which contains information about the request such as:
Similar to the AbstractService class, we see an implementation of Request for each operation: KVPReaderIn GeoServer a service is explicity bound to the HTTP protocol. For this reason it is natural to specify parameters to an operation as key-value pairs in the query string of a http url. For example, http://geo.openplans.org/geoserver/wfs?service=WFS&request=GetCapabilities&version=1.0.0 specifies three parameters: service,request/operation, and version. As before we see an implementation of KVPReader for each operation of a service. Each KVPReader is responsible for reading parameters specific to a particular operation, and parsing those values into objects. TODO: example here. These "parsed" parameters are then used to carry out the operation. ResponseThe Response is the object that actually does the work and carries out the operation. The following table maps the responsiblities of a Response to the lifecycle methods on the interface.
![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
Document generated by Confluence on Jan 16, 2008 23:26 |